<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        img{
            width:150px;
            height:150px;
        }
        .div1{
            padding: 10px;
            border:1px solid #000;
        }
        .div2 {
            float:left;
            padding: 10px;
            border:1px solid red;
        }
        .box{
            background-color: #d32d2d;
            padding: 10px;
            width:500px;
            height:400px;
        }
        .rule1 {
            float:left;
            margin:10px;
            padding: 10px;
            background-color: #eee;
            width:50px;
            text-align: center;
        }
    </style>
</head>
<body>
    <div class="div1">
        <img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic2.zhimg.com%2Fv2-8caec546245e377a2306db8d53157e2d_r.jpg%3Fsource%3D1940ef5c&refer=http%3A%2F%2Fpic2.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1653551040&t=f465bde436133a0f024090a6c66cbef2" alt="">
    </div>
    <div class="box">
        <!-- 行内元素 不能设置宽高 宽高由内容撑起来 块级相关的不要做 -->
        <span class="rule1">首页</span>
        <span class="rule1">发现</span>
        <span class="rule1">动态</span>
        <span class="rule1">我的</span>
    </div>
    <div class="div2">
        <img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic1.zhimg.com%2Fv2-b15d0c819b8b9c817448bf169d94627d_r.jpg%3Fsource%3D1940ef5c&refer=http%3A%2F%2Fpic1.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1653552855&t=ad1d9538c0f03bcf0482ab88134dc297" alt="">
    </div>
</body>
</html>